package com.gzh.teaching.service.timetask;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author guanzh
 * @Date 2021/12/2 15:50
 * @Description
 */
@Component
@Slf4j
public class testTimeTask {
    @XxlJob(value = "testTimeTaskDemo")
    public ReturnT<String> testTimeTask(String param) {
        try {
            System.out.println(param);
        } catch (Exception e) {
            log.error("调用定时任务错误：", e);
            return ReturnT.FAIL;
        }
        return ReturnT.SUCCESS;
    }
}
